<html>
<head><meta charset="utf-8"><title>Adding a new target `riscv64-unknown-freebsd` · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html">Adding a new target `riscv64-unknown-freebsd`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="246807405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246807405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246807405">(Jul 22 2021 at 04:19)</a>:</h4>
<p>I have a rather specific question.  To summarize: I have a new platform.  For the curious it is riscv64-unknown-freebsd.  It currently has no rust.  I would like it to have rust.  It has clang and a toolchain.  I need to generate rust bootstrap binaries to go into the FreeBSD ports tree such that everyone can enjoy rust on this new system ... or class of systems.</p>
<p>Please direct me to people who have knowledge on how this is done.  I have the skills and the hardware, I've just run out of ideas having tried different approaches to achieve it.</p>



<a name="246811671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246811671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246811671">(Jul 22 2021 at 05:57)</a>:</h4>
<p>I think the first step would be to add a target specification to rustc (compiler/rustc_target/src/spec) and then add support for the new target to libc (<a href="https://github.com/rust-lang/libc">https://github.com/rust-lang/libc</a>) After that you could try cross-compiling rustc from an already supported target to the new target.</p>



<a name="246811677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246811677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246811677">(Jul 22 2021 at 05:57)</a>:</h4>
<p><span class="user-mention" data-user-id="428095">@Zaphod Beeblebrox</span></p>



<a name="246867324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246867324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246867324">(Jul 22 2021 at 16:00)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/122651-general/topic/direct.20me.2E/near/246811671">said</a>:</p>
<blockquote>
<p>I think the first step would be to add a target specification to rustc (compiler/rustc_target/src/spec) and then add support for the new target to libc (<a href="https://github.com/rust-lang/libc">https://github.com/rust-lang/libc</a>) After that you could try cross-compiling rustc from an already supported target to the new target.</p>
</blockquote>
<p>Ok.  I added to the spec directory.  I created the .rs and I modified <a href="http://mod.rs">mod.rs</a> since it seems that this is where the files are linked in.  However, when I build the cross compiler with this modified source, it does not show in --print  target-list.  While I could check this little bit in, I'd like to get further.</p>



<a name="246868345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246868345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246868345">(Jul 22 2021 at 16:08)</a>:</h4>
<p><span class="user-mention" data-user-id="428095">@Zaphod Beeblebrox</span> How did you modify <code>mod.rs</code>?</p>



<a name="246868407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246868407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246868407">(Jul 22 2021 at 16:09)</a>:</h4>
<p>Can you provide a diff?</p>



<a name="246870333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246870333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246870333">(Jul 22 2021 at 16:24)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/122651-general/topic/direct.20me.2E/near/246868345">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="428095">Zaphod Beeblebrox</span> How did you modify <code>mod.rs</code>?</p>
</blockquote>
<p>[1:28:328]dgilbert@vr:~/devel/rustc-1.53.0-src/vendor/rustc-ap-rustc_target/src/spec&gt; diff mod.rs*<br>
769d768<br>
&lt;     ("riscv64gc-unknown-freebsd", riscv64gc_unknown_freebsd),</p>



<a name="246877150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246877150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246877150">(Jul 22 2021 at 17:13)</a>:</h4>
<p>That is in the <code>supported_targets!</code> block, right? That should work. Which  rustc executable did you run?</p>



<a name="246877890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246877890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246877890">(Jul 22 2021 at 17:18)</a>:</h4>
<p>I built 1.53 to stage 2 and then installed it.  Then I checked that the /usr/local/bin/rustc was date/time appropriate, then I used it to test.</p>



<a name="246878856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246878856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246878856">(Jul 22 2021 at 17:23)</a>:</h4>
<p><span class="user-mention" data-user-id="428095">@Zaphod Beeblebrox</span> How are you compiling rustc?</p>



<a name="246878953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246878953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246878953">(Jul 22 2021 at 17:24)</a>:</h4>
<p>it looks like you modified the crate in a 'vendor' directory, not in 'compiler/rustc_target/src/spec/mod.rs' in a clone of the compiler</p>



<a name="246897564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246897564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246897564">(Jul 22 2021 at 19:58)</a>:</h4>
<p>I'm using the x.py thing.</p>



<a name="246897668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246897668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246897668">(Jul 22 2021 at 19:59)</a>:</h4>
<p>OK.  Your change of directory idea got me one step further.  now I am getting this complaint.  Note that my .rs file is largely a copy of the arm64 freebsd .rs file ... along with a few modifications that made sense.</p>



<a name="246897697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246897697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246897697">(Jul 22 2021 at 19:59)</a>:</h4>
<p>Compiling rls-data v0.19.1<br>
error[E0063]: missing fields <code>abi_return_struct_as_int</code>, <code>allow_asm</code>, <code>allows_weak_linkage</code> and 88 other fields in initializer of <code>TargetOptions</code><br>
  --&gt; compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs:10:18<br>
   |<br>
10 |         options: TargetOptions {<br>
   |                  ^^^^^^^^^^^^^ missing <code>abi_return_struct_as_int</code>, <code>allow_asm</code>, <code>allows_weak_linkage</code> and 88 other fields</p>



<a name="246897897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246897897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246897897">(Jul 22 2021 at 20:01)</a>:</h4>
<p>Since, at this point, it's probably pertinent, here's my .rs file: <a href="https://termbin.com/vohv">https://termbin.com/vohv</a></p>



<a name="246898064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246898064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246898064">(Jul 22 2021 at 20:02)</a>:</h4>
<p>I think you removed a trailing <code>..Default::default()</code> from the <code>TargetOptions</code> value.</p>



<a name="246912206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246912206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246912206">(Jul 22 2021 at 22:15)</a>:</h4>
<p>getting further.  It says this now:</p>



<a name="246912207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246912207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246912207">(Jul 22 2021 at 22:15)</a>:</h4>
<p>error: unused variable: <code>base</code><br>
 --&gt; compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs:4:13<br>
  |<br>
4 |     let mut base = super::freebsd_base::opts();<br>
  |             ^^^^ help: if this is intentional, prefix it with an underscore: <code>_base</code><br>
  |</p>



<a name="246912277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246912277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246912277">(Jul 22 2021 at 22:16)</a>:</h4>
<p>... which is something I pulled from another freebsd file.  A different freebsd file includes it a different way inside the target clause ... advice?</p>



<a name="246916198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246916198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246916198">(Jul 22 2021 at 23:09)</a>:</h4>
<p>that's just a warning, I'd set <code>deny-warnings = false</code> in config.toml until you have thigns working</p>



<a name="246949888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/246949888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#246949888">(Jul 23 2021 at 07:56)</a>:</h4>
<p>Oh, I think the <code>..Default::default()</code> should actually have been <code>..base</code> instead.</p>



<a name="247013739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247013739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247013739">(Jul 23 2021 at 18:19)</a>:</h4>
<p>Well... I got past that by moving one of the things inside 'target' out to be a "base." thing.</p>



<a name="247013781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247013781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247013781">(Jul 23 2021 at 18:19)</a>:</h4>
<p>... so good.  Now I have a rustc compiler with my new target.  When I switch to that new target, I get the following:</p>



<a name="247013784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247013784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247013784">(Jul 23 2021 at 18:19)</a>:</h4>
<p>error[E0432]: unresolved imports <code>libc::c_int</code>, <code>libc::c_void</code><br>
  --&gt; library/std/src/sys_common/net.rs:17:12<br>
   |<br>
17 | use libc::{c_int, c_void};<br>
   |            ^^^^^  ^^^^^^ no <code>c_void</code> in the root<br>
   |            |<br>
   |            no <code>c_int</code> in the root</p>



<a name="247015657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247015657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247015657">(Jul 23 2021 at 18:36)</a>:</h4>
<p>You will need to add support for the new target to libc (<a href="https://github.com/rust-lang/libc">https://github.com/rust-lang/libc</a>) You may be able to copy some parts from other riscv64gc and freebsd targets.</p>



<a name="247018402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247018402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247018402">(Jul 23 2021 at 19:02)</a>:</h4>
<p>Is that contained in the rustc archive?</p>



<a name="247020995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247020995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247020995">(Jul 23 2021 at 19:24)</a>:</h4>
<p>It's not in rust-lang/rust , it's a separate repository under the rust-lang organization.</p>



<a name="247021439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247021439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247021439">(Jul 23 2021 at 19:29)</a>:</h4>
<p>and so, x.py is pulling this down for the build?</p>



<a name="247021615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247021615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247021615">(Jul 23 2021 at 19:30)</a>:</h4>
<p>How do I turn that off so I can make modifications locally?</p>



<a name="247023092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247023092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247023092">(Jul 23 2021 at 19:44)</a>:</h4>
<p><span class="user-mention" data-user-id="428095">@Zaphod Beeblebrox</span> I think you can patch cargo.toml to use a git dependency for libc instead of <a href="http://crates.io">crates.io</a></p>



<a name="247023169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247023169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247023169">(Jul 23 2021 at 19:45)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/0443424954f32d94f847322e85c77df50d44f80f/library/std/Cargo.toml#L19">https://github.com/rust-lang/rust/blob/0443424954f32d94f847322e85c77df50d44f80f/library/std/Cargo.toml#L19</a></p>



<a name="247024245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247024245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247024245">(Jul 23 2021 at 19:55)</a>:</h4>
<p>I'm not familiar with what I can put in here.  I've forked libc, made a modification for riscv64gc --- what do I put in cargo.toml?</p>



<a name="247024942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247024942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247024942">(Jul 23 2021 at 20:02)</a>:</h4>
<p>err I mean a path dependency - <code>libc = { path = "../../../libc" }</code></p>



<a name="247024948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247024948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247024948">(Jul 23 2021 at 20:02)</a>:</h4>
<p>(or whever you cloned it)</p>



<a name="247024963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247024963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247024963">(Jul 23 2021 at 20:02)</a>:</h4>
<p>something like <code>libc = { git = "https://github.com/zaphod/libc", default-features = false, features = ['rustc-dep-of-std']}</code></p>



<a name="247024972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247024972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247024972">(Jul 23 2021 at 20:02)</a>:</h4>
<p>oh path dep is probably easier yah</p>



<a name="247024987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247024987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247024987">(Jul 23 2021 at 20:02)</a>:</h4>
<p>oh yeah you will definitely still need <code>rustc-dep-of-std</code></p>



<a name="247025594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247025594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247025594">(Jul 23 2021 at 20:09)</a>:</h4>
<p>FYI, features are ignored in the <code>[patch]</code> table (will soon be a warning).</p>



<a name="247025700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247025700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247025700">(Jul 23 2021 at 20:10)</a>:</h4>
<p>Oh, I see you were saying to update std directly.  I wouldn't do that, since libc shows up in several other places.</p>



<a name="247025897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247025897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247025897">(Jul 23 2021 at 20:12)</a>:</h4>
<p><span class="user-mention" data-user-id="120518">@Eric Huss</span> what would you suggest instead if patch doesn't work?</p>



<a name="247026127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247026127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247026127">(Jul 23 2021 at 20:14)</a>:</h4>
<p>I would use <code>[patch]</code>, don't update <code>[dependencies]</code> directly.</p>



<a name="247026281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247026281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247026281">(Jul 23 2021 at 20:15)</a>:</h4>
<p>Maybe that is what you meant, but I just wasn't sure.</p>



<a name="247027440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247027440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247027440">(Jul 23 2021 at 20:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120518">Eric Huss</span> <a href="#narrow/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60/near/247026127">said</a>:</p>
<blockquote>
<p>I would use <code>[patch]</code>, don't update <code>[dependencies]</code> directly.</p>
</blockquote>
<p>but you just said <code>features</code> doesn't work with patch - how would you enable rustc-dep-of-std?</p>



<a name="247027463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247027463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247027463">(Jul 23 2021 at 20:25)</a>:</h4>
<p>or is it controlled by library/std/Cargo.toml, and it doesn't need changes at all?</p>



<a name="247027496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247027496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247027496">(Jul 23 2021 at 20:26)</a>:</h4>
<p>Yea, it's controlled from the original definition.</p>



<a name="247028223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247028223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247028223">(Jul 23 2021 at 20:33)</a>:</h4>
<p><a href="https://github.com/zBeeble42/rust-libc/tree/master/src/unix/bsd/freebsdlike/freebsd">https://github.com/zBeeble42/rust-libc/tree/master/src/unix/bsd/freebsdlike/freebsd</a></p>



<a name="247028325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247028325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247028325">(Jul 23 2021 at 20:34)</a>:</h4>
<p>... so I added <a href="http://riscv64gc.rs">riscv64gc.rs</a>.  Pretty minimal, but since the compile failed the same way, I'm assuming there's a bit of interfile linkage I'm not seeing.</p>



<a name="247034472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247034472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247034472">(Jul 23 2021 at 21:24)</a>:</h4>
<p>I think you need to add it here: <a href="https://github.com/zBeeble42/rust-libc/blob/master/src/unix/bsd/freebsdlike/freebsd/mod.rs#L1737">https://github.com/zBeeble42/rust-libc/blob/master/src/unix/bsd/freebsdlike/freebsd/mod.rs#L1737</a></p>



<a name="247034805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247034805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247034805">(Jul 23 2021 at 21:29)</a>:</h4>
<p>damn... missed that.</p>



<a name="247035806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247035806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247035806">(Jul 23 2021 at 21:40)</a>:</h4>
<p>modules can be confusing!</p>



<a name="247040920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247040920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247040920">(Jul 23 2021 at 22:41)</a>:</h4>
<p>same error fail on that build.</p>



<a name="247604140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247604140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247604140">(Jul 29 2021 at 16:04)</a>:</h4>
<p>OK.  In general, rust is pretty complex to put together.  I've made files to put in compiler/rustc_target/src/spec (modifying <a href="http://mod.rs">mod.rs</a> and making <a href="http://riscv64gc-unknown-freebsd.rs">riscv64gc-unknown-freebsd.rs</a>) and modified library/std/Cargo.toml to use my modified rust libc ... I think I'm suck in some "off by ones" ... not being of rust culture ... so not knowing exactly what's required.  The compiler knows about my new triple, but all of the sizes and whatnot don't seem to exist in libc.</p>



<a name="247604303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247604303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247604303">(Jul 29 2021 at 16:05)</a>:</h4>
<p>You may want to use a <code>[patch.crates-io]</code> section in the root <code>Cargo.toml</code> instead of changing <code>library/std/Cargo.toml</code>. libstd has some dependencies that also use libc like backtrace.</p>



<a name="247604984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247604984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247604984">(Jul 29 2021 at 16:11)</a>:</h4>
<p>that's not the error I'm getting.  I'm fixing up my git repository so that you guys can look at it.  almost finished.</p>



<a name="247605799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247605799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247605799">(Jul 29 2021 at 16:18)</a>:</h4>
<p>ok.  <a href="https://github.com/zBeeble42/rust">https://github.com/zBeeble42/rust</a> which references (AFAIK) <a href="https://github.com/zBeeble42/rust-libc">https://github.com/zBeeble42/rust-libc</a></p>



<a name="247605876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247605876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247605876">(Jul 29 2021 at 16:18)</a>:</h4>
<p>... my first goal here is to ./x.py build --stage 2 s.t. I can run an install on the target platform.</p>



<a name="247605951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247605951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247605951">(Jul 29 2021 at 16:19)</a>:</h4>
<p>The only thing missing there is config.toml --- which invokes the target architecture and --prefix=/usr/local ('cause FreeBSD).</p>



<a name="247607237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247607237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247607237">(Jul 29 2021 at 16:29)</a>:</h4>
<p>What is the exact error?</p>



<a name="247608751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247608751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247608751">(Jul 29 2021 at 16:41)</a>:</h4>
<p>The first error looks like this:</p>



<a name="247608754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247608754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247608754">(Jul 29 2021 at 16:41)</a>:</h4>
<p>17 | use libc::{c_int, c_void};<br>
   |            ^^^^^  ^^^^^^ no <code>c_void</code> in the root<br>
   |            |<br>
   |            no <code>c_int</code> in the root</p>



<a name="247608834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247608834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247608834">(Jul 29 2021 at 16:42)</a>:</h4>
<p>... which I'm told is that the types aren't filled in for the target type.</p>



<a name="247615240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247615240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247615240">(Jul 29 2021 at 17:30)</a>:</h4>
<p>What crate is it compiling when it gives that error?</p>



<a name="247615271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247615271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247615271">(Jul 29 2021 at 17:31)</a>:</h4>
<p>It should say "failed to compile X due to previous error"</p>



<a name="247630464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Adding%20a%20new%20target%20%60riscv64-unknown-freebsd%60/near/247630464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zaphod Beeblebrox <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Adding.20a.20new.20target.20.60riscv64-unknown-freebsd.60.html#247630464">(Jul 29 2021 at 19:34)</a>:</h4>
<p>error: could not compile <code>std</code></p>
<p>To learn more, run the command again with --verbose.<br>
command did not execute successfully: "/home/dgilbert/devel/rustc-1.53.0-src/build/x86_64-unknown-freebsd/stage0/bin/cargo" "build" "--target" "riscv64gc-unknown-freebsd" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/home/dgilbert/devel/rustc-1.53.0-src/library/test/Cargo.toml" "--message-format" "json-render-diagnostics"<br>
expected success, got: exit code: 101<br>
failed to run: /home/dgilbert/devel/rustc-1.53.0-src/build/bootstrap/debug/bootstrap build --stage 2<br>
Build completed unsuccessfully in 0:25:41</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>